-- @owner: wan005
-- @date: 2024-08-12
-- @testpoint: trim()函数在自定义函数中的测试

--prestep1:切换B库;expect:执行成功
@conn PrimaryDbBmode;
show sql_compatibility;

--step1:创建函数;expect:成功
drop function if exists func_trim_0040;
create or replace function func_trim_0040(c1 text)
returns text
as  $$
begin
    return trim(c1);
end;
$$language plpgsql;
/

--step2:调用函数;expect:成功
call func_trim_0040(000000001);
call func_trim_0040('  1  w  ');

--step3:清理环境;expect:清理环境完成
drop function func_trim_0040;